<template>
  <div>
    <iframe
      id="iframeId"
      :ref="iframeName"
      :src="src"
      :height="height"
      :width="width">
    </iframe>
  </div>
</template>

<script>
export default {
  name: 'tmp',
  props: {
    src: {
      type: String,
      default: ''
    },
    height: {
      type: String,
      default: ''
    },
    width: {
      type: String,
      default: ''
    }
  },
  data() {
    return {
      iframeName: `iframe${this.$getRandomNum()}`
    };
  },
  mounted() {
    console.log(document.getElementById('iframeId').contentWindow.document.getElementById('app'));
  }
};
</script>

<style scoped lang="scss"></style>
